package com.wanxi.servlet.opus;//package com.wanxi.servlet.opus;
//
//import com.alibaba.fastjson2.JSONObject;
//import com.wanxi.model.DesignerModel;
//import com.wanxi.model.OpusModel;
//import com.wanxi.model.ResultModel;
//import com.wanxi.service.DesignerService;
//import com.wanxi.service.OpusService;
//import com.wanxi.service.impl.DesignerServiceImpl;
//import com.wanxi.service.impl.OpusServiceImpl;
//import com.wanxi.util.Tool;
//
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
//    @WebServlet("/back/opus/update")
//public class OpusUpdateServlet extends HttpServlet {
//    @Override
//    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        //        1.乱码处理
////        req.setCharacterEncoding("UTF-8");
////        resp.setCharacterEncoding("UTF-8");
////        2.得到前端的值
////        page 第几页 limit 每一页显示的条数
//        String boy = req.getParameter("boy");
//        String girl = req.getParameter("girl");
//        String img = req.getParameter("img");
//        String id = req.getParameter("id");
//
//
////        3.封装到model
//        OpusModel model = new OpusModel();
//        model.setImg(Tool.nullToStr(img));
//        model.setId(Tool.strToInt(id));
//        model.setGirl(Tool.nullToStr(girl));
//        model.setBoy(Tool.nullToStr(boy));
//
//
////        4.调用service
//        OpusService opusService = new OpusServiceImpl();
////        5.得到返回值
//        ResultModel resultModel = opusService.update(model);
////        6.返回给前端
//        resp.getWriter().println(JSONObject.toJSONString(resultModel));
//    }
//}
